home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
BoxPaint
/
Source
/
Pencil.h
< prev
next >
Wrap
Text File
|
1997-03-09
|
2KB
|
89 lines
/*
* File: Pencil.h
* Summary: A 3D mouse cursor in the shape of a pencil.
* Written by: Jesse Jones
*
* Copyright ゥ 1997 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 3/09/97 JDJ Created.
*/
#pragma once
#include <Z3DAttributeSet.h>
#include <Z3DGroups.h>
#include <Z3DMatrix.h>
#include <Z3DPrimitives.h>
//-----------------------------------
// Forward References
//
class T3DView;
// ===================================================================================
// struct S3DCursorLocation
// ===================================================================================
struct S3DCursorLocation {
T3DPoint location;
T3DVector toward;
T3DVector up;
};
// ===================================================================================
// class CPencil
// ===================================================================================
class CPencil {
//-----------------------------------
// Initialization/Destruction
//
public:
virtual ~CPencil();
CPencil();
// Starts out hidden.
//-----------------------------------
// API
//
public:
void Show();
void Hide();
void MoveTo(const S3DCursorLocation& loc);
void Submit(const T3DView& view);
void Scale(const T3DDisplayGroup& model, const T3DView& view, float scale);
// Make the pencil's size scale times the model size.
//-----------------------------------
// Internal API
//
public:
void CreatePencil();
void CreateOrientationModel();
//-----------------------------------
// Member Data
//
protected:
bool mShowOrientation; // to show the direction the cursor is pointing
T3DDisplayGroup mPencilModel; // the Cursor Shape
T3DDisplayGroup mOrientationModel; // the orientation indicator
S3DCursorLocation mCursorPlacement; // Where is the cursor?
T3DMatrix mTransform; // Local to World space
T3DVector mScale; // the relative size
T3DAttributeSet mCursorAttributeSet; // Attributes for the whole cursor
};